<?php

namespace App\Http\Filters;

class InspectionFilter extends Filter
{
    protected $simpleFilters = [
        'inspection_user_name'=> ['like', '%?%'],
        'inspection_user_phone' => ['like', '%?%'],
        'inspection_type',
        'created_at'
    ];

    protected $filters = [
        'field_name',
    ];

    protected function fieldName($val)
    {
        $this->builder->where('field_name', $val);
    }

    protected function createdAt($val)
    {
        $this->builder->where('created_at', '=', "%{$val}%");
    }
}
